install_start_autocompletion_idle (chooser_entry);
}
+static void
+clear_completions (GtkFileChooserEntry *chooser_entry)
+{
+ chooser_entry->has_completion = FALSE;
+ chooser_entry->load_complete_action = LOAD_COMPLETE_NOTHING;
+}
+
static void
gtk_file_chooser_entry_do_delete_text (GtkEditable *editable,
gint start_pos,
if (chooser_entry->in_change)
return;
- chooser_entry->load_complete_action = LOAD_COMPLETE_NOTHING;
+ clear_completions (chooser_entry);
}
static void
if (chooser_entry->in_change)
return;
- chooser_entry->load_complete_action = LOAD_COMPLETE_NOTHING;
+ clear_completions (chooser_entry);
}
static void
if (chooser_entry->in_change)
return;
- chooser_entry->load_complete_action = LOAD_COMPLETE_NOTHING;
+ clear_completions (chooser_entry);
}
static void
if (chooser_entry->has_completion)
{
+ gboolean has_selection;
gint sel_end;
- if (gtk_editable_get_selection_bounds (editable, NULL, &sel_end))
- gtk_editable_set_position (editable, sel_end);
+ has_selection = gtk_editable_get_selection_bounds (editable, NULL, &sel_end);
+ g_assert (has_selection && sel_end == GTK_ENTRY (entry)->text_length);
+
+ gtk_editable_set_position (editable, sel_end);
}
else
{